using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Versions
{
    /// <summary>
    /// <para>Post Version</para>
    /// <para>Posting is the process of applying the current edit session to the reconciled target version during version geodatabase editing. Before a version can be posted, it must be reconciled with a target version and all conflicts must be resolved.</para>
    /// <para>过帐是在版本地理数据库编辑期间将当前编辑会话应用于已协调的目标版本的过程。在发布版本之前，必须将其与目标版本进行协调，并且必须解决所有冲突。</para>
    /// </summary>    
    [DisplayName("Post Version")]
    public class PostVersion : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PostVersion()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Input Workspace</para>
        /// <para>The ArcSDE geodatabase containing the edit version to be posted.</para>
        /// <para>包含要发布的编辑版本的 ArcSDE 地理数据库。</para>
        /// </param>
        /// <param name="_version_name">
        /// <para>Version Name</para>
        /// <para>Name of the edit version to be posted to the target version.</para>
        /// <para>要发布到目标版本的编辑版本的名称。</para>
        /// </param>
        public PostVersion(object _in_workspace, object _version_name)
        {
            this._in_workspace = _in_workspace;
            this._version_name = _version_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Post Version";

        public override string CallName => "management.PostVersion";

        public override List<string> AcceptEnvironments => ["configKeyword", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_workspace, _version_name, _out_workspace];

        /// <summary>
        /// <para>Input Workspace</para>
        /// <para>The ArcSDE geodatabase containing the edit version to be posted.</para>
        /// <para>包含要发布的编辑版本的 ArcSDE 地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Version Name</para>
        /// <para>Name of the edit version to be posted to the target version.</para>
        /// <para>要发布到目标版本的编辑版本的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Version Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _version_name { get; set; }


        /// <summary>
        /// <para>Output Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public PostVersion SetEnv(object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}